package com.example.test;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;

import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;

public class HomeActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        EdgeToEdge.enable(this);
        setContentView(R.layout.home);


        ImageView imageView = findViewById(R.id.user_icon);

        // 设置点击事件
        imageView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                // 创建Intent，指定当前Activity和目标Activity
                Intent intent = new Intent(HomeActivity.this, MainActivity3.class);

                // 可选：传递数据到第二个页面
                intent.putExtra("message", "你点击了图片！");

                // 启动新Activity
                startActivity(intent);
            }
        });

    }
}